package com.vilen.weather.v_learn_firstcode.app;

import android.content.Intent;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import com.vilen.weather.v_learn_firstcode.app.L_3.UIBestPracticeActivity;
import com.vilen.weather.v_learn_firstcode.app.L_4.FragmentBestPracticeActivity;
import com.vilen.weather.v_learn_firstcode.app.L_5.BroadcastBestPractice;
import com.vilen.weather.v_learn_firstcode.app.L_6.DatabaseActivity;

/**
 * Created by vilen on 2015/5/26.
 */
public class ItemActivity extends BaseActivity{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_item);
        Button button = (Button)findViewById(R.id.button_1);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //快速传递到FirstActivity
                FirstActivity.actionStart(ItemActivity.this,"data1","data2");
            }
        });
        Button button_ui = (Button)findViewById(R.id.button_ui);
        button_ui.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //
                UIBestPracticeActivity.actionStart(ItemActivity.this,"data1","data2");
            }
        });
        Button button_fragment = (Button) findViewById(R.id.button_fragment);
        button_fragment.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                FragmentBestPracticeActivity.actionStart(ItemActivity.this,"data1","data2");
            }
        });
        Button button_broadcast = (Button) findViewById(R.id.button_broadcast);
        button_broadcast.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                BroadcastBestPractice.actionStart(ItemActivity.this,"data1","data2");
            }
        });
        Button button_database =  (Button) findViewById(R.id.button_database);
        button_database.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                DatabaseActivity.actionStart(ItemActivity.this,"data1","data2");
            }
        });
    }
}
